import 'common/js/common'
import Vue from 'vue'
import App from './main'
import router from 'router/dataLookBoard'
import clipboard from 'clipboard'
import {
  Tip,
  IndexList,
  Scroll,
  Popup,
} from 'cube-ui';
import {numAddSep} from 'common/js/utl'

Vue.use(Tip)
Vue.use(Scroll)
Vue.use(Popup)
Vue.use(IndexList)

new clipboard('.clipboard-btn');

new Vue({
  el: '#app',
  router,
  // store,
  render: h => h(App)
})



Vue.filter('numAddSep', function (value) {
  return numAddSep(value)
})

Vue.filter('numAddSepFixed', function (value) {
  return numAddSep((+value).toFixed(0))
})


Vue.filter('toDate', function (dt) {
  let m = dt.getMonth() + 1
  let d = dt.getDate()
  return dt.getFullYear() + '年' + ( m > 9 ? m : '0' + m) + '月' + (d > 9 ? d : '0' + d) + '日'
})


